Dynomotion

Group: DynoMotion Message: 10549 From: rjreese29@ymail.com Date: 11/24/2014
Subject: Tuning posts/parameters cause and effect/ pfmea kind of thing
Hi Tom,

I am working my way through learning to tune a closed loop on the kflop. In doing so, I am struggling trying to understand how to tune. At this time, I do not have any specific questions about my application in getting it working, but rather, I would be interested in your insight as to good/your greatest posts/info:
1) that shows pfmea type info on what causes what...has an effect on... With the trade off of....on... In regards to PID parameters, all max limits,other parameters
2) do any other documents exist besides forum
posts on tuning, good videos etc. (I have all the manuals, and I use the help buttons in dynomotion software)
3)relationships of iir filters to PID & max limits, ....
4)what are the order of operations in tuning? Typically


I may have lost my way in reading postsI have read and reread many of your successful posts like Frankenstein Anilam... And I am very impressed by your support.

A 1000+ test moves on my machine,and reading these forums, have really made me appreciate the kflop, and to make it a tuned system, dealing with the mechanical aspects of tuning and how difficult it is.

Very soon I will come up with some questions, but I wanted to get a fuller understanding by doing more homework and trials, I am ok with a bit more struggling, then I'll come out and ask some very specific questions after somemore reading and trials.
Right now I am just interested in parameters cause and effect readings if you have any.

Thanks,
Rob
Group: DynoMotion Message: 10553 From: Tom Kerekes Date: 11/25/2014
Subject: Re: Tuning posts/parameters cause and effect/ pfmea kind of thing
Hi Rob,

Unfortunately Servo Tuning is complex. There isn't really a simple - this parameter causes this problem situation.  Everything somewhat interacts and needs to work together to get the desired result.  Every system is different and has different requirements.

But basically and simplistically:

P Gain simply applies an Output Drive Proportional to error (how far the system is away from the Desired Target Destination).  This is usually the primary source of corrective feedback.  ie used for: "If way off to the right side of the road turn way left"

I Gain increases or decreases the Output Drive at a rate proportional to error (Output is proportional to all previous errors accumulated).  Corrects small persistent errors.  ie used for: "If slightly off to the right keep gradually rotating the steering wheel to the left until centered"

D Gain applies an Output Drive proportional to the rate of approach to the target.  ie used for: "Rapidly approaching a stop sign - apply brakes until speed is reduced"

PID values will influence how the system responds dynamically to errors.  Filters will also influence the dynamics of how the system responds and offer additional and more flexibility than PID values.  It is very difficult to intuitively predict how a change to PID+Filters will affect the dynamic system behavior when thinking in the time domain.   Working in the frequency domain is much more intuitive.  There is a considerable learning curve involved which is beyond most Users but is really the only way to have an understanding of the dynamics of a system.  It involves a two step process.  #1 one must understand how the shape of the Magnitude/Phase plot (Bode Plot) of the system will determine its response. #2 one must understand how PID+Filters will affect the Bode Plot.  For example a Bode Plot with a High Bandwidth and with large Gain and Phase Margins will correct errors quickly and be a stable system.  A Low pass Filter will reduce the amplitude of higher frequencies and introduce phase lag at higher frequencies.   Integrator Gain will increase the magnitude of low frequencies and add phase lag.  D gain will increase the magnitude of higher frequencies and add phase lead.  

This is all classical control theory.  There are numerous resources on-line

Regarding Max Limits: in general when a system is operating normally Max Limits (Errors, Output, Integrator, Following) should have no limiting effect and should have no influence on the dynamic response.  Generally the Max Limits are designed to help in abnormal situations in order to avoid an overly violent system response to the abnormal situation.  For example Max Integrator reduces a problem referred to as Integrator Wind-up.  If you take a well behaved and well tuned system (with some I Gain) and force the motor off of target a small amount and hold it off for a long time the Integrator will accumulate a huge amount of error.  If you suddenly release the motor shaft the system will respond with a violent overshoot.  Max Integrator can be used to make the integrator stop accumulating error at some level.

The order of tuning operations are usually:

#1 start with P gain
#2 add D gain (2nd order low pass filter 1000Hz Q1.4 will reduce output spikes)
#3 repeat #1 and #2 a few times
#4 add small amount of I gain

HTH
Good luck
Regards
TK

Group: DynoMotion Message: 10562 From: Rjreese29 Date: 11/25/2014
Subject: Re: Tuning posts/parameters cause and effect/ pfmea kind of thing
Thank you!!!!! Yes, complex relationships.
This is very helpful. Your car apologies are always a plus.  I will read, apply and give it a go.

I ended up with some of the best responses just last night, seeing the parameter and output relationships, so I am looking forward to trying some more tonight.

Thanks Tom!!!

Rob

On Nov 25, 2014, at 11:54 AM, Tom Kerekes tk@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:

 

Hi Rob,

Unfortunately Servo Tuning is complex. There isn't really a simple - this parameter causes this problem situation.  Everything somewhat interacts and needs to work together to get the desired result.  Every system is different and has different requirements.

But basically and simplistically:

P Gain simply applies an Output Drive Proportional to error (how far the system is away from the Desired Target Destination).  This is usually the primary source of corrective feedback.  ie used for: "If way off to the right side of the road turn way left"

I Gain increases or decreases the Output Drive at a rate proportional to error (Output is proportional to all previous errors accumulated).  Corrects small persistent errors.  ie used for: "If slightly off to the right keep gradually rotating the steering wheel to the left until centered"

D Gain applies an Output Drive proportional to the rate of approach to the target.  ie used for: "Rapidly approaching a stop sign - apply brakes until speed is reduced"

PID values will influence how the system responds dynamically to errors.  Filters will also influence the dynamics of how the system responds and offer additional and more flexibility than PID values.  It is very difficult to intuitively predict how a change to PID+Filters will affect the dynamic system behavior when thinking in the time domain.   Working in the frequency domain is much more intuitive.  There is a considerable learning curve involved which is beyond most Users but is really the only way to have an understanding of the dynamics of a system.  It involves a two step process.  #1 one must understand how the shape of the Magnitude/Phase plot (Bode Plot) of the system will determine its response. #2 one must understand how PID+Filters will affect the Bode Plot.  For example a Bode Plot with a High Bandwidth and with large Gain and Phase Margins will correct errors quickly and be a stable system.  A Low pass Filter will reduce the amplitude of higher frequencies and introduce phase lag at higher frequencies.   Integrator Gain will increase the magnitude of low frequencies and add phase lag.  D gain will increase the magnitude of higher frequencies and add phase lead.  

This is all classical control theory.  There are numerous resources on-line

Regarding Max Limits: in general when a system is operating normally Max Limits (Errors, Output, Integrator, Following) should have no limiting effect and should have no influence on the dynamic response.  Generally the Max Limits are designed to help in abnormal situations in order to avoid an overly violent system response to the abnormal situation.  For example Max Integrator reduces a problem referred to as Integrator Wind-up.  If you take a well behaved and well tuned system (with some I Gain) and force the motor off of target a small amount and hold it off for a long time the Integrator will accumulate a huge amount of error.  If you suddenly release the motor shaft the system will respond with a violent overshoot.  Max Integrator can be used to make the integrator stop accumulating error at some level.

The order of tuning operations are usually:

#1 start with P gain
#2 add D gain (2nd order low pass filter 1000Hz Q1.4 will reduce output spikes)
#3 repeat #1 and #2 a few times
#4 add small amount of I gain

HTH
Good luck
Regards
TK